The Parikh vector p(s) of a string s is defined as the vector ofmultiplicities of the characters. Parikh vector q occurs in s if s has asubstring t with p(t)=q. We present two novel algorithms for searching for aquery q in a text s. One solves the decision problem over a binary text inconstant time, using a linear size index of the text. The second algorithm, fora general finite alphabet, finds all occurrences of a given Parikh vector q andhas sub-linear expected time complexity; we present two variants, which bothuse a linear size index of the text.
展开▼